<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>变量</title>
</head>

<body>
    <div>打开控制台看看把</div>
    <script>
        let name = '小明'
        let age = 18
        let empty = undefined
        let empty2 = null
            // + 拼接
        console.log(name + age + '岁了')
        console.log("null:" + undefined + "  null:" + null)
        let data = {
            name: '小明',
            age: 18,
            empty: undefined,
            empty2: null,
        }
        console.log("data", data);


        // 模板字符串
        console.log(`我是${name}，今年${age}岁了`)

        const PI = 3.14
        console.log('圆周率是' + PI)

        const dog = {
            name: '柴犬',
            age: 3,
            male: true,
        }
        console.log('mydog', dog);
        dog.skill = 'smile'
        console.log('mydog update', dog);
    </script>
</body>

</html>